document.addEventListener("DOMContentLoaded", () => {
  const projectsSlider = new Swiper(".projects__swiper", {
    // direction: "vertical",
    slidesPerView: 3,
    spaceBetween: 50,
    navigation: {
      nextEl: ".projects__nav-btn-next",
      prevEl: ".projects__nav-btn-prev",
    },

    breakpoints: {
      1280: {
        slidesPerView: 3,
        spaceBetween: 50,
      },

      1200: {
        slidesPerView: 3,
        spaceBetween: 40,
      },

      1024: {
        slidesPerView: 2,
        spaceBetween: 50,
      },

      768: {
        slidesPerView: 2,
        spaceBetween: 34,
      },

      565: {
        slidesPerView: 2,
        spaceBetween: 34,
      },

      320: {
        slidesPerView: 1,
      },
    },

    a11y: {
      prevSlideMessage: "Предыдущий",
      nextSlideMessage: "Следующий",
    },
    keyboard: {
      enabled: true,
      onlyInViewport: true,
    }, // можно управлять с клавиатуры стрелками влево/вправо
  });

  // ----------- Tooltips ------------

  tippy(".tippy-1", {
    content: "tippy-1",
    placement: "top",
    animation: "shift-away",
  });
  tippy(".tippy-2", {
    content: "tippy-2",
    placement: "top",
    animation: "shift-away",
  });
  tippy(".tippy-3", {
    content: "tippy-3",
    placement: "top",
    animation: "shift-away",
  });
});
